USE [HR_DB]
GO
if exists(select * from dbo.sysobjects where id = object_id(N'role')   and   OBJECTPROPERTY(id,   N'IsUserTable')   =   1)   
  drop table role   
-- =============================================
-- Author:杨洁(kaixuanpisces)
-- Create date: 20090802
-- Description:	角色表
-- =============================================
CREATE TABLE [dbo].[role](
	[role_id] [smallint] IDENTITY(1,1) NOT NULL,
	[role_name] [varchar](60) NOT NULL,
	[role_remark] [varchar](max) NULL,
	[role_status] [tinyint] NOT NULL
) ON [PRIMARY]

GO
SET ANSI_PADDING OFF
GO
-- ==============================================
-- 列名说明
-- ==============================================
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'角色编号，自动增长列' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'role', @level2type=N'COLUMN',@level2name=N'role_id'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'角色名称' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'role', @level2type=N'COLUMN',@level2name=N'role_name'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'备注信息' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'role', @level2type=N'COLUMN',@level2name=N'role_remark'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'状态(0、无效1、有效)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'role', @level2type=N'COLUMN',@level2name=N'role_status'